<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"   
      xmlns:jb="http://java.sun.com/jsf/composite/componentes"
      xmlns:p="http://primefaces.org/ui">

    <SCRIPT language="JavaScript" type="text/javascript">
                   
        function handleRequest(xhr, status, args) {                     
            if(args.validationFailed || !args.CallbackParam) {  
     
            } else {                              
                carDialogUbicacion.hide();  
                jQuery('#btnGuardarDetalle').fadeOut();  
            }  
        }  
    </SCRIPT>
    <h:form onsubmit="return checkSubmit();"  id="frmDetalle">
        <h:panelGrid id="pgFormDtoDeta"   frame="box">
            <h:panelGrid  columns="4" cellpadding="4">
                <h:outputLabel value="#{i18n['general.label.id']}" styleClass="label" rendered="#{sessionMBean.accionDetalle != applicationMBean.nuevo}"/>
                <h:outputText value="#{planCobroMBean.cobroDto.id}" rendered="#{sessionMBean.accionDetalle != applicationMBean.nuevo}" styleClass="txtCampo"/>

                <h:outputLabel styleClass="label" value="#{i18n['plan.cobro.id']}"/>
                <h:outputText value="#{planCobroMBean.dto.id}" styleClass="txtCampo"/>
                
                <h:outputLabel for="itFormPago" styleClass="label" value="#{i18n['cobro.detalle.forma.pago.descripcion']}"/>
                <p:selectOneMenu id="itFormPago" value="#{planCobroMBean.cobroDto.formaPagoDto}" required="true"  converter="parametroConvert"  disabled="true"                               
                                 style="#{applicationMBean.estiloObligatorio}">
                    <f:selectItems value="#{planCobroMBean.listaFormaPago}" var="parametroDto"  itemLabel="#{parametroDto.descripcion}" itemValue="#{parametroDto}" />                        
                </p:selectOneMenu>
                
                <h:outputLabel for="itMoneda" styleClass="label" value="#{i18n['cobro.detalle.moneda']}"/>
                <p:selectOneMenu id="itMoneda" value="#{planCobroMBean.cobroDto.monedaDto}"  converter="monedaConvert" style="#{applicationMBean.estiloObligatorio}"
                                 disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}" required="true">
                    <f:selectItems value="#{planCobroMBean.listaMonedas}" var="monedaDto" itemLabel="#{monedaDto.descripcion}" itemValue="#{monedaDto}" /> 
                </p:selectOneMenu>
                
                <h:outputLabel for="itTotal" value="#{i18n['cobro.detalle.monto']}" styleClass="label"/>
                <p:inputText id="itTotal" label="#{i18n['cobro.detalle.monto']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{planCobroMBean.cobroDto.monto}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('decimal',this)"
                             required="false" size="10" >
                    <f:validateLength minimum="1" maximum="9" />                    
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
                </p:inputText>
                
                <h:outputLabel for="itFecCobro" value="#{i18n['cobro.detalle.fecha.cobro']}" styleClass="label"/>
                <p:calendar id="itFecCobro" value="#{planCobroMBean.cobroDto.fechaCobro}"  label="#{i18n['cobro.detalle.fecha.cobro']}" 
                            pattern="#{applicationMBean.formatoFecha}"  required="true" disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                            style="#{applicationMBean.estiloObligatorio}" mindate="#{planCobroMBean.fechaActual}"> 
                </p:calendar>
            </h:panelGrid>  

            <p:separator />

            <p:panel id="pnlAcciones" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}">
                <h:panelGrid columns="10">
                    <p:commandButton id="btnGuardarDetalle" update=":msjDialogDeta,:frmPrincipal" 
                                     title="#{i18n['general.button.guardar.tip']}"
                                     ajax="true"  
                                     style="#{applicationMBean.estilosBtnGuardar}"
                                     icon="ui-icon ui-icon-disk" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}"
                                     value="#{i18n['general.button.guardar']}" 
                                     action="#{planCobroMBean.guardarCobroUbicacion}"
                                     oncomplete="handleRequest(xhr, status, args);">                                    
                    </p:commandButton>
                    
                    <p:commandButton title="#{i18n['general.button.cancelar.tip']}" ajax="true"
                                     icon="ui-icon ui-icon-disk"
                                     rendered="#{sessionMBean.accionDetalle == applicationMBean.editar &amp;&amp; planCobroMBean.cobroDto.estado == 'P'}"
                                     onclick="return confirm('#{i18n.general_mensaje_confirmacion}');"
                                     value="#{i18n['general.button.cancelar']}"
                                     style="#{applicationMBean.cssBotonVerde}"
                                     action="#{planCobroMBean.cobrarUbicacion}">                        
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </h:panelGrid>  
    </h:form>
</html>